/**************************************************
|	File:		CProjectile.h
|	Author:		Benjamin Budian
|	Course:		SGD
|	Purpose:	Projectile is an arrow fired from an entity
**************************************************/
#pragma once
#include "entity.h"
#include "BitmapFont.h"
#include "Game.h"

#include "../SGD Wrappers/IListener.h"

class CProjectile :
	public CEntity, public IListener
{
public:
	CProjectile(int nFrameID);
	virtual ~CProjectile(void);

	CEntity* GetOwner() {return m_pOwner;}
	float GetDamage() { return m_fDamage; }

	virtual void SetOwner(CEntity* pOwner);

	virtual void Update			( float fElapsedTime )				override;
	virtual void Render			( void )							override;
	virtual void HandleCollision( const IEntity* pOther )			override;
 	virtual void HandleEvent( CEvent* pEvent )	override;

	void SetDebugMode(bool bDebug) { m_bDebug = bDebug;}


protected:
	RECT CellAlgorithm(int ID);

	float m_fDamage;

	int m_nNumCols;
	int m_nFrameWidth;
	int m_nFrameHeight;
	int m_nCurrentFrame;

	CEntity* m_pOwner;

	bool m_bDebug;


};

